<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet"
          href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu"
          crossorigin="anonymous">
    <!-- 生产环境版本，优化了尺寸和速度 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <style>
        *{padding: 0;margin: 0;}
        body{
            max-width: 1920px;
            min-width: 0;
            margin-left: auto;
            margin-right: auto;
            background-color: #fff;
        }
        a{
            cursor: pointer;
            text-decoration: none;
            outline: none;
            color: #8d526d;
        }
        .header a:hover{color: #FFFFFF;text-decoration:none}
        .header-bottom .action-item a{display: block;}
        .sidebar .sidebar-header i{
            margin-right: 14px;
            display: inline-block;
            font-size: 20px;
        }
        .sidebar .sidebar-header h2{
            font-size: 20px;
            color: inherit;
            font-weight: normal;
            display: inline-block;
        }
        .sidebar ul.menu li{
            position: relative;
            background-color: inherit;
            border-bottom: 1px solid #c6c6c6;
            list-style-type: none;
            list-style-image: none;
            line-height: 150%;
            margin-bottom: 0;
        }
        .sidebar .sidebar-header ul.menu a{
            position: relative;
            overflow: hidden;
            font-size: 16px;
            color: #000000;
        }
        .sidebar ul.menu li > a{
            display: block;
            padding: 21px 14px;
            background-color: #F2F2F2;
            color: #000000;
        }
        .sidebar ul.menu li > a:hover{
            color: #8D526D;
            text-decoration:none
        }
        .t-l{text-align: left;}
        .titile-wrapper .titile-wrapper-content{
            font-size: 24px;
            line-height: 1.5;
            color: #8d526d;
            margin-bottom: 14px;
            margin-top: 14px;
            font-weight: bold;
        }
        .list .list-item{
            padding: 14px 0;
            border-bottom: 1px dashed #000;;
        }
        .list .list-item .list-time{
            float: left;
            color: #777;
            font-size: 16px;
            line-height: 1.5;
            margin-right: 14px;
        }
        .list .list-item .list-title{
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 16px;
            line-height: 1.5;
            color: #000;
        }
        .list .list-item .list-title a{
            font-size: inherit;
            color: inherit;
        }
        .list .list-item .list-title a:hover{
            color: #8D526D;
            text-decoration:none
        }
        a{
            cursor: pointer;
            text-decoration: none;
            outline: none;
            color: #8d526d;
        }
        .header a:hover{color: #FFFFFF;text-decoration:none}
        .footer-bottom p{
            margin: 0 0 7px;
            line-height: 1.5;
            color: #333;
            font-size: 14px;
        }
    </style>
</head>
<body>

<div id="app">

    <div class="t-l titile-wrapper">
        <div class="titile-wrapper-content"
        >
            医院新闻
        </div>
    </div>
    <div class="list">
        <div class="list-item" v-for="(val, i) in newsInfo">
            <div class="list-time"
                 v-html="val.publicDate.substring(0, 10)">
                {{ val.publicDate.substring(0, 10) }}
            </div>
            <div class="list-title">
                <a :href=" '/demo/news.html?id=' + val.id "
                   target="_blank"
                   v-html="val.title" >
                    {{ val.title }}
                </a>
            </div>
        </div>
    </div>

    <el-pagination
            background
            @current-change="handleCurrentChange"
            layout="prev, pager, next"
            :total="totalCount">
    </el-pagination>
</div>

<script>

    var haha = new Vue({
        el:"#app",
        data:{
            totalCount: 0,
            newsArr:[],
            columnArr:[],
            newsInfo:{}
        },
        methods:{
            handleCurrentChange(val){
                getData(val, 10);
            },
        }
    });
    /* 默认为 医院新闻 欢迎页 */
    function getData(a, b) {
        haha.npageNumber = a;
        haha.pageCount = b;
        $.get("/demo/hospitalNews/hospitalNewsWelcomePage" , function (backData) {
            haha.newsInfo = backData.data.currentData;
            haha.totalCount = backData.data.totalCount;
        });
    }
    getData(1,10);

</script>

</body>
</html>
